package org.jeecg.modules.system.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.hepler.DingDingHelper;
import org.jeecg.modules.system.execute.ZYCTDBaseExecute;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@Api(tags="crawler")
@RequestMapping("/crawler/")
public class YctdController {

    @Resource
    private ZYCTDBaseExecute zyctdBaseExecute;

    @GetMapping("/test")
    @ApiOperation(value = "获取快讯", notes = "获取快讯")
    public Result<?> test(){
        try {
            zyctdBaseExecute.baseExecute();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return Result.OK();
    }
}
